<template>

  <h1 >文本相关指令</h1>
  <p>{{info }}</p>
  <h3>{{info }}</h3>
<h1>{{info }}</h1>
  {{info+'早上好'}}
  <input type="text">

  <button @click="f()"> 我是按钮</button>

  <p v-text="info"></p>
  <p v-html="info"></p>
</template>

<script setup>
import {ref} from "vue";

const info = ref('测试文本1123456789');

const f = ()=>{
  info.value='值变了';//在js中使用响应式变量，必须.value
  info.value = '值<b>更新</b>了'
}
</script>

<style scoped>

</style>